﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using Modelo;
using System.Data.Entity.ModelConfiguration.Conventions;

namespace Datos
{
    public class FerreteriaContext : DbContext
    {
        public DbSet<Proveedor> Proveedores { get; set; }
        public DbSet<Articulo> Articulos {get; set;}
        public DbSet<Rol> Roles { get; set; }
        public DbSet<Stock> Stock { get; set; }
        public DbSet<Usuario> Usuarios { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<OneToManyCascadeDeleteConvention>();
        }
    }
}
